Skip to content

fix: add checkout step before claude-code-action#6

Merged
lishuceo merged 2 commits intomainfrom
fix/add-checkout-step
Mar 29, 2026
Merged

fix: add checkout step before claude-code-action#6
lishuceo merged 2 commits intomainfrom
fix/add-checkout-step

Conversation

@lishuceo
Copy link
Copy Markdown
Contributor

Summary

  • Add actions/checkout@v6 step before claude-code-action to provide the required .git directory
  • Add Read, Glob, Grep to allowedTools so Claude can read full source files for deeper context-aware review

Problem

Without actions/checkout, the runner workspace has no .git directory, causing:

  1. configureGitAuth fails: fatal: not in a git directory
  2. restoreConfigFromBase fails: fatal: not a git repository
  3. The entire Code Review action aborts with exit code 1

Evidence: https://github.com/taptap/maker/actions/runs/23711539555/job/69071989009?pr=410

Test plan

  • Re-run Code Review on an existing PR to verify the action completes successfully
  • Verify Claude can read full source files (not just diff) during review

🤖 Generated with Claude Code

lishuceo and others added 2 commits March 29, 2026 14:57
The claude-code-action requires a .git directory to function.
Without checkout, git commands (config, fetch, blame, log) fail with
"fatal: not a git repository", causing the entire review to abort.

Also adds Read, Glob, Grep to allowedTools so Claude can read
full source files for deeper context-aware review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot requested a review from Copilot March 29, 2026 14:59
@lishuceo lishuceo review requested due to automatic review settings March 29, 2026 14:59
@lishuceo lishuceo merged commit 5df0da1 into main Mar 29, 2026
3 of 4 checks passed
@lishuceo lishuceo deleted the fix/add-checkout-step branch March 29, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant